<template>
    <view :class="uiStyle == 1 ? '' : 'uiStyle'" >
        <!-- pages/order/index.wxml -->
		<view class="head-block" v-if="weixin == 2">
		     <view class="nav-title" :style="'top:10px'"></view>
			 <!-- 返回 -->
			 <view class="icon" @tap="goMy" :style="'top:6px'">
			      <van-icon name="arrow-left" color="#333" size="45rpx" />
			  </view>
		 </view>		
        <header navigateTitle="我的订单"></header>
		<view  class="" v-html="payData">
			
		</view>
        <view class="order">
            <view v-if="false">
                <map class="map" id="mymap"></map>
            </view>
            <view class="order-header">
                <view class="header-l">
                    <!-- <van-icon name="bullhorn-o" /> -->
                    <image src="../../static/assets/img/tip.png" class="img-tip"></image>
                    <view class="header-text">停车过程中，需要帮助请联系车场电话</view>
                </view>
                <view class="header-r">
                    <view class="header-r-c" @tap="handlePhoneKf">
                        <view class="header-r-t">
                            <image src="../../static/assets/img/kf.png" alt=""></image>
                            客服
                        </view>
                    </view>
                </view>
            </view>
            <view class="order-body">
                <van-tabs :active="active" @change="onChange">
                    <van-tab title="包月订单">
                        <view v-if="list && list.length > 0">
                            <view style="margin: 20rpx 20rpx 20rpx 20rpx" v-for="(item, key) in list" :key="item.key">
                                <view class="card" v-if="item.billExpireTime != null && item.highTechCheckStatus != null">
                                    <!-- 高新订单判断 -->
                                    <view class="card-header">
                                        <view class="card-header-text">
                                            <span>订单明细</span>
                                        </view>
                                        <view>
                                            <view v-if="item.refundStatus == 2">
                                                <!-- <image src='/assets/img/icon2.png' style="width:120rpx" /> -->
                                                <view class="card-header-icon-text text-gray">已退款</view>
                                            </view>

                                            <view v-else-if="item.orderStatus === 106">
                                                <!-- <image src='/assets/img/icon1.png' /> -->
                                                <view class="card-header-icon-text text-red">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-else-if="item.orderStatus === 104">
                                                <!-- <image src='/assets/img/icon2.png' /> -->
                                                <view class="card-header-icon-text text-gray">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-else-if="item.orderStatus === 101 || item.orderStatus === 102">
                                                <!-- <image src='/assets/img/icon4.png' /> -->
                                                <view class="card-header-icon-text text-red">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-else-if="item.orderStatus === 108 || item.orderStatus === 103 || item.orderStatus === 109">
                                                <!-- <image src='/assets/img/icon2.png' /> -->
                                                <view class="card-header-icon-text">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-else-if="item.orderStatus === 107 || item.orderStatus === 110 || item.orderStatus === 4">
                                                <!-- <image src='/assets/img/icon2.png' /> -->
                                                <view class="card-header-icon-text text-gray">{{ item.typeStatus }}</view>
                                            </view>

                                            <view v-else-if="item.highTechCheckStatus == 0">
                                                <!-- <image src='/assets/img/icon1.png' style="width:120rpx" /> -->
                                                <view class="card-header-icon-text text-orange">审核中</view>
                                            </view>
                                            <view v-else-if="item.highTechCheckStatus == 1">
                                                <!-- <image src='/assets/img/icon1.png' style="width:120rpx" /> -->
                                                <view class="card-header-icon-text text-orange">预约成功</view>
                                            </view>
                                            <view v-else-if="item.highTechCheckStatus == -1">
                                                <!-- <image src='/assets/img/icon2.png' style="width:120rpx" /> -->
                                                <view class="card-header-icon-text text-red">审核失败</view>
                                            </view>
                                            <view v-else-if="item.orderStatus === 105">
                                                <!-- <image src='/assets/img/icon1.png' /> -->
                                                <view class="card-header-icon-text">{{ item.typeStatus }}</view>
                                            </view>
                                        </view>
                                    </view>
                                    <view class="card-order">
                                        <view class="card-order-l">
                                            <view class="card-order-l-t new-blt">
                                                <view class="card-order-spname">{{ item.parkingName }}</view>
                                                <view class="card-order-spnum" v-if="item.parkingSpaceNo">
                                                    <view class="spnum-fixtext" v-if="item.parkingSpaceNo != '不固定车位号'">车位</view>
                                                    <view class="spnum-num">{{ item.parkingSpaceNo }}</view>
                                                </view>
                                                <image v-if="item.parkingSpaceNo && item.spaceOwnerType == 1" class="img-person" src="../../static/assets/img/park-person.png"></image>
                                            </view>
                                            <!-- <view class="card-order-l-c">
                                    <view class="card-order-l-text">月卡类型：</view>
                                    <view class="card-order-l-content">
                                        {{item.type == 1?'包整月卡':item.type== 2?'夜间月卡':'--'}}
                                    </view>
                                </view> -->
                                            <view class="card-order-l-c">
                                                <view class="card-order-l-text">使用时段：</view>
                                                <view class="card-order-l-content">
                                                    {{ item.reservationTimeContent ? item.reservationTimeContent : '全天' }}
                                                </view>
                                            </view>
                                            <view class="card-order-l-c">
                                                <!-- <image src='/assets/img/timeicon.png' /> -->
                                                <view class="card-order-l-text">月卡期限：</view>
                                                <view class="card-order-l-content" v-if="item.startTime">
                                                    <view>{{ item.startTime }}~</view>
                                                    <view>{{ item.endTime }}</view>
                                                </view>
                                            </view>
                                            <view class="card-order-l-c">
                                                <!-- <image src='/assets/img/caricon.png' /> -->
                                                <view class="card-order-l-text">
                                                    <text :decode="true">车&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;辆：</text>
                                                </view>
                                                <view class="card-order-l-content wdcl">
                                                    <view>{{ item.plateNo }}</view>
                                                    <!-- <view class="card-order-l-c-icon" wx:if="{{option1.length>0}}" data-value="{{item.plateNo}}" data-key="aaa_{{item.id}}" data-index="{{key}}" bindtap="onConfirm">
                                            <image src='/assets/img/xg.png' />
                                        </view> -->
                                                </view>
                                                <!-- <van-dropdown-menu wx:if="{{option1.length>0}}">
                                        <van-dropdown-item id="aaa_{{item.id}}" bind:change="change" value="{{ value1 }}" options="{{ option1 }}" />
                                    </van-dropdown-menu> -->
                                            </view>
                                            <!-- <view class="card-order-l-c">
                                    <image src="/assets/img/addressicon.png" />
                                    <view class="card-order-l-text">车位地址</view>
                                    <view class="card-order-l-content">{{item.parkingAddress}}</view>
                                </view> -->
                                            <view class="card-order-l-c" v-if="item.spaceOwnerType == 2">
                                                <!-- <image src="/assets/img/wyicon.png" /> -->
                                                <view class="card-order-l-text">车场电话:</view>
                                                <view class="card-order-l-content">
                                                    {{ item.parkingPhone || '暂无电话' }}
                                                    <image src="../../static/assets/img/phone.jpg" :data-id="item.parkingPhone" @tap="handlePhoneWy" style="margin-left: 10rpx;" />
                                                </view>
                                            </view>
                                            <view class="card-order-l-btns" v-if="item.spaceOwnerType == 1">
                                                <view
                                                    class="contact-btn"
                                                    @tap="gotoMessage"
                                                    :data-data="item"
                                                    :data-url="
                                                        '../socks/socks?manageId=' + item.manageId + '&recipientUserId=' + item.manageIdentityId + '&otherName=' + item.manageName
                                                    "
                                                >
                                                    <image src="../../static/assets/img/message.png" class="img-msg"></image>
                                                    <view>留言咨询</view>
                                                </view>
                                                <view class="contact-btn" @tap="handlePhoneWy2" :data-id="item.id">
                                                    <image src="../../static/assets/img/phone-blue.png" class="img-phone"></image>
                                                    <view>联系电话</view>
                                                </view>
                                            </view>
                                        </view>
                                        <view class="card-order-r">
                                            <view class="card-order-r-lx" :data-data="item" @tap="gotoNavigate">
                                                <image src="../../static/assets/img/lxicon.png" />
                                                <view>导航</view>
                                            </view>
                                            <view class="card-order-r-p"></view>
                                            <!-- <view class="card-order-r-lx">
                                                <image
                                                    src="../../static/assets/img/parkEwm.jpg"
                                                    :data-img="item.guidePicture"
                                                    :data-name="item.parkingName"
                                                    :data-id="item.parkingPhone"
                                                    @tap="handleguidePicture"
                                                />
                                                <view :data-img="item.guidePicture" :data-id="item.parkingPhone" :data-name="item.parkingName" @tap="handleguidePicture">
                                                    预约二维码
                                                </view>
                                            </view> -->
                                        </view>
                                    </view>
                                    <view class="card-line"></view>
                                    <view class="card-footer">
                                        <view class="card-footer-left-text">
                                            订单金额：
                                            <text class="footer-left-text-unit">￥</text>
                                            <text class="footer-left-text-price">{{ item.money / 100 }}</text>
                                            元
                                        </view>
                                        <view class="card-footer-timetip" v-if="item.billExpireTime && (item.orderStatus === 101 || item.orderStatus === 103)">
                                            请于{{ item.billExpireTime }}前支付
                                        </view>
                                        <view style="display: flex; justify-content: flex-end; flex: 6">
                                            <view class="card-footer-btn-dob" v-if="item.orderStatus === 101 || item.orderStatus === 103">
                                                <!-- 待支付 -->
                                                <view class="card-footer-btn qj" :data-id="item.id" @tap="cancelApply">取消订单</view>
                                                <view class="card-footer-btn pay" :data-id="item.id" :data-lltParkingInfoType="item.lltParkingInfoType" @tap="goPay">去支付</view>
                                            </view>
                                            <!-- <view wx:elif="{{item.orderStatus===106}}"  bindtap="gotoBuy" data-data="{{item}}" class="card-footer-btn pj">
                                    续租
                                </view>                 -->
                                            <view class="card-footer-btn-dob" v-else-if="item.highTechCheckStatus == 0">
                                                <!-- 审核中 -->
                                                <view class="card-footer-btn pay unpay" :data-id="item.id" :data-plateno="item.plateNo" @tap="unoderPay">申请退款</view>
                                            </view>
                                            <view class="card-footer-btn-dob" v-else-if="item.highTechCheckStatus == -1">
                                                <!-- 审核失败 -->
                                                <view
                                                    class="card-footer-btn pay"
                                                    :data-id="item.billNo"
                                                    :data-plateno="item.plateNo"
                                                    :data-url="'/pages/licenseIdentify2/licenseIdentify2?id=' + item.plateNo + '&billNo=' + item.billNo"
                                                    @tap="reSubmit"
                                                >
                                                    重新提交
                                                </view>
                                                <!-- <view class="card-footer-btn qj" data-id="{{item.id}}" data-plateno="{{item.plateNo}}" bindtap="cancelApply">
                                        取消预约
                                    </view> -->
                                            </view>
                                            <view class="card-footer-btn-dob" v-else-if="item.orderStatus == 1 || item.orderStatus === 105 || item.orderStatus === 106">
                                                <!-- 预约中 -->
                                                <view class="card-footer-btn pay unpay" :data-id="item.id" :data-plateno="item.plateNo" @tap="unoderPay">申请退款</view>
                                            </view>
                                            <!-- <view class="card-footer-btn-dob" wx:elif="{{item.orderStatus==107}}">
                                    <view class="card-footer-btn pay" data-id="{{item.id}}" data-plateno="{{item.plateNo}}" bindtap="showeamilPopup">
                                        申请开票
                                    </view>
                                </view> -->

                                            <!-- <view class="card-footer-btn-dob" wx:if="{{item.orderStatus===105||item.orderStatus===106}}">
                                    <view class="card-footer-btn qx" data-id="{{item.id}}" bindtap="cancelApply">
                                        申请退租
                                    </view>
                                    <view class="card-footer-btn lxcz" data-id="{{item.id}}" bindtap="showPopup">
                                        联系对方
                                    </view>
                                </view> -->
                                            <!-- <view class="card-footer-btn-dob" wx:if="{{item.orderStatus===108}}">
                                    <view class="card-footer-btn qx">取消申请</view>
                                    <view class="card-footer-btn lxcz" bindtap="showPopup" data-id="{{item.id}}">
                                        联系对方
                                    </view>
                                </view> -->
                                            <view v-if="item.orderStatus === 107 && item.isEvaluate == 0" :data-orderId="item.id" @tap="handleeValuate" class="card-footer-btn pj">
                                                评分
                                            </view>
                                        </view>
                                    </view>
                                </view>

                                <view class="card" v-else>
                                    <view class="card-header">
                                        <view class="card-header-text">
                                            <span>订单明细</span>
                                        </view>
                                        <view>
                                            <view v-if="item.orderStatus === 105 || item.orderStatus === 106">
                                                <!-- <image src='/assets/img/icon1.png' /> -->
                                                <view class="card-header-icon-text text-red">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 104">
                                                <!-- <image src='/assets/img/icon2.png' /> -->
                                                <view class="card-header-icon-text text-gray">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 101 || item.orderStatus === 102">
                                                <!-- <image src='/assets/img/icon4.png' /> -->
                                                <view class="card-header-icon-text text-red">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 108 || item.orderStatus === 103 || item.orderStatus === 109">
                                                <!-- <image src='/assets/img/icon5.png' /> -->
                                                <view class="card-header-icon-text text-red">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 107 || item.orderStatus === 110 || item.orderStatus === 4">
                                                <!-- <image src='/assets/img/icon2.png' /> -->
                                                <view class="card-header-icon-text text-gray">{{ item.typeStatus }}</view>
                                            </view>
                                        </view>
                                    </view>
                                    <view class="card-order">
                                        <view class="card-order-l">
                                            <view class="card-order-l-t new-blt">
                                                <view class="card-order-spname">{{ item.parkingName }}</view>
												<view style="display: flex;margin: 16rpx 0;">
													<view class="card-order-spnum" v-if="item.parkingSpaceNo">
													    <view class="spnum-fixtext" v-if="item.parkingSpaceNo != '不固定车位号'">车位</view>
													    <view class="spnum-num">{{ item.parkingSpaceNo }}</view>
													</view>
													<image v-if="item.parkingSpaceNo && item.spaceOwnerType == 1" class="img-person" src="../../static/assets/img/park-person.png"></image>
												</view>
                                              
                                            </view>
                                            <!-- <view class="card-order-l-c">
                                    <view class="card-order-l-text">月卡类型：</view>
                                    <view class="card-order-l-content">
                                        {{item.type == 1?'包整月卡':item.type== 2?'夜间月卡':'--'}}
                                    </view>
                                </view> -->
                                            <view class="card-order-l-c">
                                                <view class="card-order-l-text">使用时段：</view>
                                                <view class="card-order-l-content">
                                                    {{ item.reservationTimeContent ? item.reservationTimeContent : '全天' }}
                                                </view>
                                            </view>
                                            <view class="card-order-l-c">
                                                <!-- <image src='/assets/img/timeicon.png' /> -->
                                                <view class="card-order-l-text">月卡期限：</view>
                                                <view class="card-order-l-content" v-if="item.startTime">
                                                    <view>{{ item.startTime }}~</view>
                                                    <view>{{ item.endTime }}</view>
                                                </view>
                                            </view>
                                            <view class="card-order-l-c">
                                                <!-- <image src='/assets/img/caricon.png' /> -->
                                                <view class="card-order-l-text">
                                                    <text :decode="true">车&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;辆：</text>
                                                </view>
                                                <view class="card-order-l-content wdcl">
                                                    <view>{{ item.plateNo }}</view>
                                                    <!-- <view class="card-order-l-c-icon" wx:if="{{option1.length>0}}" data-value="{{item.plateNo}}" data-key="aaa_{{item.id}}" data-index="{{key}}" bindtap="onConfirm">
                                            <image src='/assets/img/xg.png' />
                                        </view> -->
                                                </view>
                                                <!-- <van-dropdown-menu wx:if="{{option1.length>0}}">
                                        <van-dropdown-item id="aaa_{{item.id}}" bind:change="change" value="{{ value1 }}" options="{{ option1 }}" />
                                    </van-dropdown-menu> -->
                                            </view>
                                            <!-- <view class="card-order-l-c">
                                    <image src="/assets/img/addressicon.png" />
                                    <view class="card-order-l-text">车位地址</view>
                                    <view class="card-order-l-content">{{item.parkingAddress}}</view>
                                </view> -->
                                            <view class="card-order-l-c" v-if="item.spaceOwnerType == 2">
                                                <!-- <image src="/assets/img/wyicon.png" /> -->
                                                <view class="card-order-l-text">车场电话:</view>
                                                <view class="card-order-l-content">
                                                    {{ item.parkingPhone || '暂无电话' }}
                                                    <image src="../../static/assets/img/phone.jpg" :data-id="item.parkingPhone" @tap="handlePhoneWy" style="margin-left: 10rpx;" />
                                                </view>
                                            </view>
                                            <view class="card-order-l-btns" v-if="item.spaceOwnerType == 1">
                                                <view
                                                    class="contact-btn"
                                                    @tap="gotoMessage"
                                                    :data-data="item"
                                                    :data-url="
                                                        '../socks/socks?manageId=' + item.manageId + '&recipientUserId=' + item.manageIdentityId + '&otherName=' + item.manageName
                                                    "
                                                >
                                                    <image src="../../static/assets/img/message.png" class="img-msg"></image>
                                                    <view>留言咨询</view>
                                                </view>
                                                <view class="contact-btn" @tap="handlePhoneWy2" :data-id="item.id">
                                                    <image src="../../static/assets/img/phone-blue.png" class="img-phone"></image>
                                                    <view>联系电话</view>
                                                </view>
                                            </view>
                                        </view>
                                        <view class="card-order-r">
                                            <view class="card-order-r-lx" :data-data="item" @tap="gotoNavigate">
                                                <image src="../../static/assets/img/lxicon.png" />
                                                <view>导航</view>
                                            </view>
                                            <view class="card-order-r-p"></view>
                                            <!-- <view class="card-order-r-lx">
                                                <image
                                                    src="../../static/assets/img/parkEwm.jpg"
                                                    :data-id="item.parkingPhone"
                                                    :data-img="item.guidePicture"
                                                    :data-name="item.parkingName"
                                                    @tap="handleguidePicture"
                                                />
                                                <view :data-img="item.guidePicture" :data-id="item.parkingPhone" :data-name="item.parkingName" @tap="handleguidePicture">
                                                    预约二维码
                                                </view>
                                            </view> -->
                                        </view>
                                    </view>
                                    <view class="card-line"></view>
                                    <view class="card-footer">
                                        <!-- <view class="card-footer-l">
                                <image src="/assets/img/dhicon.png" />
                                <view>停车位图示</view>
                            </view> -->
                                        <view class="card-footer-left-text">
                                            订单金额：
                                            <text class="footer-left-text-unit">￥</text>
                                            <text class="footer-left-text-price">{{ item.money / 100 }}</text>
                                            元
                                        </view>
                                        <view class="card-footer-timetip" v-if="item.billExpireTime && (item.orderStatus === 101 || item.orderStatus === 103)">
                                            请于{{ item.billExpireTime }}前支付
                                        </view>
                                        <view style="display: flex; justify-content: flex-end; flex: 6">
                                            <view class="card-footer-btn-dob" v-if="item.orderStatus === 101 || item.orderStatus === 103">
                                                <view class="card-footer-btn qj" :data-id="item.id" @tap="cancelApply">取消订单</view>
                                                <view class="card-footer-btn pay" :data-id="item.id" :data-lltParkingInfoType="item.lltParkingInfoType" @tap="goPay">去支付</view>
                                            </view>
                                            <!-- <view class="card-footer-btn-dob" wx:if="{{item.orderStatus===105||item.orderStatus===106}}">
                                    <view class="card-footer-btn qx" data-id="{{item.id}}" bindtap="cancelApply">
                                        申请退租
                                    </view>
                                    <view class="card-footer-btn lxcz" data-id="{{item.id}}" bindtap="showPopup">
                                        联系对方
                                    </view>
                                </view> -->
                                            <!-- <view class="card-footer-btn-dob" wx:if="{{item.orderStatus===108}}">
                                    <view class="card-footer-btn qx">取消申请</view>
                                    <view class="card-footer-btn lxcz" bindtap="showPopup" data-id="{{item.id}}">
                                        联系对方
                                    </view>
                                </view> -->
                                            <view v-if="item.orderStatus === 107 && item.isEvaluate == 0" :data-orderId="item.id" @tap="handleeValuate" class="card-footer-btn pj">
                                                评分
                                            </view>
                                            <!-- <view wx:if="{{item.orderStatus===106}}"  bindtap="gotoBuy" data-data="{{item}}" class="card-footer-btn pj">
                                    续租
                                </view> -->
                                        </view>
                                    </view>
                                </view>
                            </view>
                        </view>
                        <view v-else>
                            <view class="nopark">
                                <image src="../../static/assets/img/empty.png"></image>
                            </view>
                            <view class="text">暂无数据</view>
                        </view>
                    </van-tab>

                    <van-tab title="临停订单">
                        <view v-if="list && list.length > 0">
                            <view style="margin: 20rpx 20rpx 20rpx 20rpx" v-for="(item, key) in list" :key="item.key">
                                <view class="card">
                                    <view class="card-header">
                                        <view class="card-header-text">
                                            <span>订单明细</span>
                                        </view>
                                        <view>
                                            <view v-if="item.orderStatus === 2 || item.orderStatus === 1 || item.orderStatus === 7">
                                                <!-- <image src='/assets/img/icon1.png' style="width:120rpx" /> -->
                                                <view class="card-header-icon-text text-orange">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 4 || item.orderStatus === 5">
                                                <!-- <image src='/assets/img/icon4.png' /> -->
                                                <view class="card-header-icon-text text-red">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 6">
                                                <!-- <image src='/assets/img/icon5.png' /> -->
                                                <view class="card-header-icon-text text-red">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 3">
                                                <!-- <image src='/assets/img/icon2.png' /> -->
                                                <view class="card-header-icon-text">{{ item.typeStatus }}</view>
                                            </view>
                                            <view v-if="item.orderStatus === 8 || item.orderStatus === 9">
                                                <!-- <image src='/assets/img/icon2.png' /> -->
                                                <view class="card-header-icon-text text-gray">{{ item.typeStatus }}</view>
                                            </view>
                                        </view>
                                    </view>
                                    <view class="card-order">
                                        <view class="card-order-l">
                                            <view class="card-order-l-t new-blt">
                                                <view class="card-order-spname">{{ item.parkingName }}</view>
												<view style="display: flex;margin: 16rpx 0;">
													<view class="card-order-spnum" v-if="item.parkingSpaceNo">
													    <view class="spnum-fixtext" v-if="item.parkingSpaceNo != '不固定车位号'">车位</view>
													    <view class="spnum-num">{{ item.parkingSpaceNo }}</view>
													</view>
													<image v-if="item.parkingSpaceNo && item.spaceOwnerType == 1" class="img-person" src="../../static/assets/img/park-person.png"></image>
												</view>

                                            </view>
                                            <view class="card-order-l-c">
                                                <!-- <image src='/assets/img/yyicon.png' /> -->
                                                <view class="card-order-l-text">预约日期：</view>
                                                <!-- <view class="card-order-l-content">{{item.planTime}}</view> -->
                                                <view class="card-order-l-content">
                                                    <view>{{ item.startTime }}</view>
                                                    <!-- <view>~{{item.endTime}}</view> -->
                                                </view>
                                            </view>
                                            <view class="card-order-l-c">
                                                <!-- <image src='/assets/img/timeicon.png' /> -->
                                                <view class="card-order-l-text">共享时段：</view>
                                                <view class="card-order-l-content">
                                                    <view>{{ item.spaceTempStartTime }}~</view>
                                                    <view>{{ item.spaceTempEndTime }}</view>
                                                </view>
                                            </view>
                                            <view class="card-order-l-c" style="position: relative">
                                                <!-- <image src='/assets/img/caricon.png' /> -->
                                                <view class="card-order-l-text"><text :decode="true">车&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;辆：</text></view>
                                                <view class="card-order-l-content wdcl">
                                                    <view>{{ item.plateNo }}</view>
                                                    <!-- <view wx:if="{{option1.length>0}}" class="card-order-l-c-icon" data-id="{{item.id}}" data-value="{{item.plateNo}}" data-key="aaa_{{item.id}}" data-index="{{key}}" bindtap="onConfirm">
                                            <image src='/assets/img/xg.png' />
                                        </view> -->
                                                </view>
                                                <!-- <view style="height: 0; position: absolute; top: -50rpx">
                                                    <van-dropdown-menu v-if="option1.length > 0" title-class="hahaha">
                                                        <van-dropdown-item
                                                            :id="'aaa_' + item.id"
                                                            @change="change($event, { tagId: 'aaa_' + item.id })"
                                                            :value="value1"
                                                            :options="option1"
                                                        />
                                                    </van-dropdown-menu>
                                                </view> -->
                                            </view>
                                            <!-- <view class="card-order-l-c">
                                    <image src="/assets/img/addressicon.png" />
                                    <view class="card-order-l-text">车位地址：</view>
                                    <view class="card-order-l-content">{{item.parkingAddress}}</view>
                                </view> -->
                                            <view class="card-order-l-c" v-if="item.spaceOwnerType == 2">
                                                <!-- <image src="/assets/img/wyicon.png" /> -->
                                                <view class="card-order-l-text">车场电话:</view>
                                                <view class="card-order-l-content">
                                                    {{ item.parkingPhone || '暂无电话' }}
                                                    <image src="../../static/assets/img/phone.jpg" :data-id="item.parkingPhone" @tap="handlePhoneWy" style="margin-left: 10rpx;"/>
                                                </view>
                                            </view>
                                            <view class="card-order-l-btns" v-if="item.spaceOwnerType == 1">
                                                <view
                                                    class="contact-btn"
                                                    @tap="gotoMessage"
                                                    :data-data="item"
                                                    :data-url="
                                                        '../socks/socks?manageId=' + item.manageId + '&recipientUserId=' + item.manageIdentityId + '&otherName=' + item.manageName
                                                    "
                                                >
                                                    <image src="../../static/assets/img/message.png" class="img-msg"></image>
                                                    <view>留言咨询</view>
                                                </view>
                                                <view class="contact-btn" @tap="handlePhoneWy2" :data-id="item.id">
                                                    <image src="../../static/assets/img/phone-blue.png" class="img-phone"></image>
                                                    <view>联系电话</view>
                                                </view>
                                            </view>
                                        </view>
                                        <view class="card-order-r">
                                            <view class="card-order-r-lx" :data-data="item" @tap="gotoNavigate">
                                                <image src="../../static/assets/img/lxicon.png" />
                                                <view>导航</view>
                                            </view>
                                            <view class="card-order-r-p"></view>
                                            <!-- <view class="card-order-r-lx">
                                                <image
                                                    src="../../static/assets/img/parkEwm.jpg"
                                                    :data-img="item.guidePicture"
                                                    :data-id="item.parkingPhone"
                                                    :data-name="item.parkingName"
                                                    @tap="handleguidePicture"
                                                />
                                                <view :data-img="item.guidePicture" :data-id="item.parkingPhone" :data-name="item.parkingName" @tap="handleguidePicture">
                                                    预约二维码
                                                </view>
                                            </view> -->
                                        </view>
                                    </view>
                                    <view class="card-line" v-if="item.orderStatus != 3"></view>
                                    <view class="card-footer" v-if="item.orderStatus != 3">
                                        <view class="card-footer-l">
                                            <!-- <image src="/assets/img/dhicon.png" data-img="{{item.guidePicture}}" bindtap="handleguidePicture" />
                                <view data-img="{{item.guidePicture}}" bindtap="handleguidePicture">
                                    停车位图示
                                </view> -->
                                            <view class="card-footer-left-text" v-if="(item.money != 0 && item.orderStatus === 4) || (item.money != 0 && item.orderStatus === 7)">
                                                订单金额：
                                                <text class="footer-left-text-unit">￥</text>
                                                <text class="footer-left-text-price">{{ item.money / 100 }}</text>
                                                元
                                                <!-- <view class="card-footer-left-detail" bindtap="showDetail" data-detail="{{item}}">详情</view> -->
                                            </view>
                                            <view class="card-footer-timetip" v-if="item.billExpireTime && (item.orderStatus === 4 || item.orderStatus === 6)">
                                                请于{{ item.billExpireTime }}前支付
                                            </view>
                                        </view>
                                        <view style="display: flex; justify-content: flex-end; flex: 4">
                                            <view class="card-footer-btn-dob" v-if="item.orderStatus === 7">
                                                <view class="card-footer-btn qj" :data-id="item.id" @tap="handleCancel">取消预约</view>
                                                <!-- <view class="card-footer-btn lxcz" data-id="{{item.id}}" bindtap="showPopup">
                                        联系对方
                                    </view> -->
                                            </view>
                                            <!-- <view wx:if="{{item.orderStatus===1}}" class="card-footer-btn lxcz" bindtap="showPopup">
                                联系对方
                            </view> -->
                                            <!-- <view wx:if="{{item.orderStatus===2}}" class="card-footer-btn lxcz" data-id="{{item.id}}" bindtap="showPopup">
                                    联系对方
                                </view> -->
                                            <view class="card-footer-btn-dob">
                                                <!-- <view class="card-footer-btn qj" data-id="{{item.id}}" bindtap="handleCancel">
                                        取消预约
                                    </view> -->
                                                <view
                                                    class="card-footer-btn qj"
                                                    :data-id="item.id"
                                                    @tap="cancelApply"
                                                    v-if="item.spaceOwnerType == 2 && (item.orderStatus === 1 || item.orderStatus === 2)"
                                                >
                                                    取消订单
                                                </view>
                                                <view class="card-footer-btn qj" :data-id="item.id" @tap="cancelApply" v-if="item.spaceOwnerType == 1 && item.orderStatus === 4">
                                                    取消订单
                                                </view>
                                                <view class="card-footer-btn pay" :data-id="item.id" :data-lltParkingInfoType="item.lltParkingInfoType" @tap="goPay" v-if="item.orderStatus === 4">去支付</view>
                                            </view>
                                            <!-- wx:if="{{item.orderStatus===7}}" -->
                                            <view class="card-footer-btn pj" v-if="item.orderStatus === 107 && item.isEvaluate == 0" @tap="handleeValuate" :data-orderId="item.id">
                                                评分
                                            </view>
                                        </view>
                                    </view>
                                </view>
                            </view>
                        </view>
                        <view v-else>
                            <view class="nopark">
                                <image src="../../static/assets/img/empty.png"></image>
                            </view>
                            <view class="text">暂无数据</view>
                        </view>
                    </van-tab>
                </van-tabs>
            </view>
            <!-- 联系对方弹窗 -->
            <van-popup v-model="show" position="bottom" round @close="onClose">
                <view class="pop-container">
                    <view class="pop-c-text" @tap="handlePopphone">电话联系</view>
                    <view class="pop-c-message" @tap="showtextPopup">信息联系</view>
                    <view class="pop-c-canel" @tap="onClose">取消</view>
                </view>
            </van-popup>		
            <!-- 信息提示弹窗 -->
            <van-dialog
                confirm-button-color="#00BCAB"
                use-slot
                title="信息留言"
                v-model="textShow"
                round-button
                show-cancel-button
                confirm-button-open-type="getUserInfo"
                @close="ontextClose"
                @getuserinfo="getUserInfo"
                class="popup"
            >
                <van-cell-group>
                    <van-field v-model="message" label="留言" type="textarea" placeholder="请输入留言" autosize :border="false" />
                </van-cell-group>
            </van-dialog>
            <!-- 开票邮件弹窗 -->
            <van-dialog confirm-button-color="#00BCAB" use-slot title="开票邮箱地址" v-model="emailShow" round-button show-cancel-button class="popup" @confirm="sendTicket">
                <van-cell-group>
                    <van-field v-model="emailValue" label="开票邮箱地址" type="textarea" placeholder="请输入开票邮箱地址" autosize :border="false" />
                </van-cell-group>
            </van-dialog>
            <!-- 评价弹出框 -->
            <van-dialog
                confirm-button-color="#00BCAB"
                use-slot
                title="请为该车位评分"
                v-model="Valuateshow"
                show-cancel-button
                confirm-button-open-type="getUserInfo"
                @close="onCloseValuate"
                @confirm="getUserInfoValuate"
                class="popup"
            >
                <van-rate v-model="valueRate" :size="25" color="#FF9800;" void-color="#eee" void-icon="star" @change="onChangeValueRate" />
                <van-field
                    v-model="Valuatemessage"
                    type="textarea"
                    placeholder="请放心留言，留言仅平台可见，对方不可见"
                    :autosize="autosize"
                    @change="changeValuatemessage"
                    custom-style="margin:20rpx 50rpx;background:#f4f4f4;width:85%"
                />
            </van-dialog>
            <!-- 取消预约 -->
            <van-dialog confirm-button-color="#00BCAB" id="van-dialog" />
        </view>
    </view>
</template>

<script>
import header from '../header/header';
import util from './../../utils/util.js';
import api from './../../utils/api.js';
import { Dialog } from 'vant';
import config from './../../utils/config.js';
export default {
    components: {
        header
    },
    data() {
        return {
            // unionId: wx.getStorageSync("unionId") || "",
            list: [],

            option1: [],
            emailValue: '',
            plateNos: '',
            plateNosId: '',
            value1: 0,
            valueCar: '',
			payshow:false,
			payData:'',
            //显示车牌号
            show: false,

            //联系车主弹窗
            textShow: false,

            //留言
            emailShow: false,

            //开票邮箱
            message: '',

            //留言
            Valuatemessage: '',

            //评价留言
            Valuateshow: false,

            //评价
            valueRate: 5,

            //评分
            cancelshow: false,

            //取消预约只查询车主
            personType: 1,

            //我的订单
            phoneNumber: '',

            type: 1,

            //1车位主|车主，2车场，3客服
            carOrderLogId: '',

            //订单号
            active: 0,

            billNo: '',

            autosize: {
                minHeight: 100
            },

            emailId: '',
            activeOrderId: '',
            imgheights: '',
			uiStyle:1,
			weixin:uni.getStorageSync('weixin')
        };
    },
    onLoad: function (options) {
		this.uiStyle = uni.getStorageSync('uiStyle')
        if (options.type) {
            const type = options.type;
            this.setData({
                active: type == 1 ? 1 : 0
            });
        }

        const option = uni
            .getStorageSync('plateNos')
            .split(',')
            .map((e, i) => ({
                text: e,
                value: i
            }));
        this.setData({
            option1: option
        }); // if (Object.keys(options).length) {
        //   const detail = decodeURIComponent(JSON.parse(options.detail));
        //   this.setData({
        //     personType: detail
        //   });
        // }

        this.getmyCarOrderLog();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
		 goMy() {
				     uni.navigateBack({
				         delta: 1
				     });
				 },
        handleguidePicture(e) {
            // console.log(e.currentTarget.dataset)
            // if(!e.currentTarget.dataset.img){
            //   wx.showToast({
            //     title: '抱歉，暂无引导图！',
            //     icon: 'none'
            //   })
            //   return;
            // }
            // wx.navigateTo({
            //   url: "../parkImgNav/index?parkingCode="+ e.currentTarget.dataset.id+"&guidePicture="+e.currentTarget.dataset.img+"&name="+e.currentTarget.dataset.name
            // });
            uni.previewImage({
                urls: ['https://shareparking.wasu.cn/share-parking/static/qrcode.jpg'],
                //需要预览的图片http链接列表，注意是数组
                current: '',
                // 当前显示图片的http链接，默认是第一个
                success: function (res) {},
                fail: function (res) {},
                complete: function (res) {}
            }); // wx.navigateTo({
            //   url: "../setParkingimg/index?img=" + e.currentTarget.dataset.img
            // });
        },

        //tab切换
        onChange(e) {
			console.log(e)
            this.setData({
                active: e
            });
            this.getmyCarOrderLog();
        },

        handlePhoneWy(e) {
			if(uni.getStorageSync('weixin') == 3 || uni.getStorageSync('weixin') == 4){
				ZWJSBridge.phoneCall({
				  "corpId": e.currentTarget.dataset.id.toString()
				}).then(res => {
				  console.log(res)
				}).catch(err => {
				  console.log(err) 
				})
			}else{
				uni.makePhoneCall({
					phoneNumber: e.currentTarget.dataset.id.toString()
				}).catch((e) => {
					console.log(e);
				});
			}
        },

        handlePhoneWy2(e) {
            const unionId = uni.getStorageSync('unionId') || '';
            util.request(api.call + '?carOrderLogId=' + e.currentTarget.dataset.id.toString() + '&userUnionId=' + unionId + '&type=1', 'get').then((res) => {
                if (res.code == 0) {
					if(uni.getStorageSync('weixin') == 3 || uni.getStorageSync('weixin') == 4){
						ZWJSBridge.phoneCall({
						  "corpId": res.data
						}).then(res => {
						  console.log(res)
						}).catch(err => {
						  console.log(err) 
						})
					}else{
						uni.makePhoneCall({
							phoneNumber: res.data
						}).catch((e) => {
							console.log(e);
						});
					}
                } else {
                }
            });
        },

        handlePhoneKf() {
            this.setData({
                type: 3,
                carOrderLogId: ''
            });
            this.getcall();
        },

        handlePopphone() {
            this.setData({
                type: 1
            });
            this.getcall();
        },

        //更换车牌下拉
        onConfirm(e) {
            const key = e.currentTarget.dataset.key;
            console.log(e.currentTarget.dataset);
            this.$mp.page.selectComponent(`#${key}`).toggle();
            this.setData({
                plateNosId: e.currentTarget.dataset.index,
                carOrderLogId: e.currentTarget.dataset.id
            });
        },

        change({ detail }, _dataset) {
            /* ---处理dataset begin--- */
            this.datasetHandle(undefined, _dataset);
            /* ---处理dataset end--- */
            const plateNos = this.option1.find((e) => e.value === detail).text;
            this.list[this.plateNosId].plateNo = plateNos;
            this.setData({
                value1: detail,
                list: this.list,
                plateNos: plateNos
            });
            this.setplateNoModify(plateNos);
        },

        //联系车主弹窗
        showPopup(e) {
            this.setData({
                show: true,
                carOrderLogId: e.currentTarget.dataset.id
            });
        },

        onClose() {
            this.setData({
                show: false
            });
        },

        //留言
        getUserInfo(event) {
            console.log(event.detail);
        },

        showtextPopup() {
            console.log(this.textShow);
            this.setData({
                textShow: true
            });
            this.setData({
                show: false
            });
        },

        showeamilPopup(e) {
            const id = e.currentTarget.dataset.id;
            console.log(this.emailShow);
            this.setData({
                emailShow: true,
                emailId: id
            });
            this.setData({
                show: false
            });
        },

        ontextClose() {
            this.setData({
                textShow: false
            });
        },

        //请评价
        handleeValuate(e) {
            this.setData({
                Valuateshow: true,
                activeOrderId: e.currentTarget.dataset.orderid
            });
        },

        onCloseValuate() {
            this.setData({
                Valuateshow: false
            });
        },

        onChangeValueRate(e) {
            this.setData({
                valueRate: e.detail
            });
        },

        changeValuatemessage(e) {
            this.setData({
                Valuatemessage: e.detail
            });
        },

        getUserInfoValuate(event) {
            const { activeOrderId, valueRate, Valuatemessage } = this;
            const unionId = uni.getStorageSync('unionId');
            const param = {
                orderId: activeOrderId,
                userUnionId: unionId,
                evaluateScore: valueRate,
                evaluateContent: Valuatemessage || ''
            };
            util.request(api.userEvaluate, param, 'post').then((res) => {
                if (res.code == 0) {
                    uni.showToast({
                        title: '评价成功',
                        icon: 'success'
                    });
                } else {
                    uni.showToast({
                        title: res.msg,
                        icon: 'none'
                    });
                }

                this.setData({
                    activeOrderId: null,
                    valueRate: 5,
                    Valuatemessage: ''
                });
            });
        },

        //去支付
        goPay(e) {
            const carOrderLogId = e.currentTarget.dataset.id;
            const lltparkinginfotype = e.currentTarget.dataset.lltparkinginfotype;
            const that = this;
			var payType = uni.getStorageSync('weixin') == 2 ? 2 : 1
			if(uni.getStorageSync('weixin') == 2){
				util.request(api.unionPayStartPay + '?carOrderLogId=' + carOrderLogId, {payType}, 'POST','application/x-www-form-urlencoded').then((res) => {
				    if (res.code == 0) {
				        if (res.busiCode == 'alipay') {
				            uni.showToast({
				                title: '当前车场仅支持支付宝支付，请联系客服处理',
				                icon: 'none'
				            });
				        } else {
							const data = JSON.parse(res.data);
							if(lltparkinginfotype == 3){
								var {url,content,wxContent} = JSON.parse(res.data)
								jWeixin.miniProgram.navigateTo({url:"/pages/wxContent/wxContent?param=" + wxContent})
							}else{
							var miniPayRequest = data.miniPayRequest ? JSON.parse(data.miniPayRequest) : data;
							var packages = miniPayRequest.package.split('_id=')[1]
							jWeixin.miniProgram.navigateTo({url:"/pages/wxPay/wxPay?nonceStr=" + miniPayRequest.nonceStr + '&package=' + packages  + '&paySign=' + encodeURI(miniPayRequest.paySign) + '&timeStamp=' + miniPayRequest.timeStamp + "&from=02" })
							}
				           
				        }
				    } else {
				        uni.showToast({
				            title: res.msg,
				            icon: 'none'
				        });
				    }
				});
			}else{
				util.request(api.startPay + '?carOrderLogId=' + carOrderLogId, {payType}, 'POST','application/x-www-form-urlencoded').then((res) => {
				    if (res.code == 0) {
				        const data = res.data;
						if(lltparkinginfotype == 3){
							var {url,content} = JSON.parse(data)
							window.location.href = url + '?' + content
						}else{
							document.querySelector('body').innerHTML = res.data;
							document.forms[0].submit()
						}
				    } else {
				        uni.showToast({
				            title: res.msg,
				            icon: 'none'
				        });
				    }
				});
			}

        },

        // 申请退租
        cancelApply(e) {
            const carOrderLogId = e.currentTarget.dataset.id;
            const unionId = uni.getStorageSync('unionId');
			console.log("取消订单")
            Dialog.confirm({
                title: '取消订单',
                message: '是否确认取消订单？'
            }).then((res) => {
                util.request(api.cancelApply + `?carOrderLogId=${carOrderLogId}&userUnionId=${unionId}`, 'get').then((res) => {
                    if (res.code == 0) {
                        uni.showToast({
                            title: res.data,
                            icon: 'none'
                        });
                        this.getmyCarOrderLog();
                    } else {
                        uni.showToast({
                            title: res.msg,
                            icon: 'none'
                        });
                    }
                });
            });
        },

        //申请开票
        sendTicket() {
            const id = this.emailId;
            const unionId = uni.getStorageSync('unionId');
            var that = this;

            if (!this.emailValue) {
                return;
            }

            var param = {
                invoiceType: 0,
                //开票类型0：个人1：公司
                name: uni.getStorageSync('name'),
                email: that.emailValue,
                //前端弹框获取
                unionId: unionId,
                billNoList: [id]
            };
            util.request(api.dealInvoice, param, 'POST').then((res) => {
                if (res.code == 0) {
                    uni.showToast({
                        title: res.data,
                        icon: 'none'
                    });
                } else {
                    uni.showToast({
                        title: res.msg,
                        icon: 'none'
                    });
                }
            });
        },

        //重新提交
        reSubmit(e) {
            // if (event.currentTarget.dataset.url) {
            //   wx.navigateTo({
            //     url: event.currentTarget.dataset.url,
            //   });
            // } else {
            //   wx.showModal({
            //     title: "",
            //     content: "该板块正在建设中",
            //     showCancel: false,
            //     confirmText: "我知道了",
            //     confirmColor: "#FFA000",
            //     success(res) {
            //       if (res.confirm) {
            //         // console.log('用户点击确定')
            //       }
            //     },
            //   });
            // }
            var that = this; //坑1： this需要这么处理

            uni.chooseImage({
                count: 1,
                sizeType: ['original', 'compressed'],
                sourceType: ['album', 'camera'],

                success(res) {
                    // tempFilePath可以作为img标签的src属性显示图片
                    const tempFilePaths = res.tempFilePaths; // console.log(tempFilePaths[0])

                    uni.uploadFile({
                        url: api.vueUpload,
                        filePath: tempFilePaths[0],
                        name: 'file',
                        formData: {
                            user: 'test'
                        },
                        header: {
                            Authorization: uni.getStorageSync('AUTHORIZATION') //如果需要token的话要传
                        },

                        success(res) {
                            // console.log(res)
                            var data = JSON.parse(res.data);
                            var picUrl = data.data;
                            const id = e.currentTarget.dataset.id;
                            const unionId = uni.getStorageSync('unionId');
                            const plateno = e.currentTarget.dataset.plateno;
                            var param = {
                                billNo: id,
                                plateNo: plateno,
                                unionId: unionId,
                                picUrl: picUrl //补充资料的图片url地址 现在暂时确定为只有公司授权书没有才会被驳回
                            };
                            console.log(param);
                            util.request(api.updateMonthCar, param, 'POST').then((res) => {
                                if (res.code == 0) {
                                    uni.showToast({
                                        title: '重新提交成功！',
                                        icon: 'none'
                                    });
                                    that.getmyCarOrderLog();
                                } else {
                                    uni.showToast({
                                        title: res.msg,
                                        icon: 'none'
                                    });
                                }
                            });
                        }
                    });
                },

                fail(res) {}
            });
        },

        //申请退款
        unoderPay(e) {
            const id = e.currentTarget.dataset.id;
            const unionId = uni.getStorageSync('unionId');
            const plateno = e.currentTarget.dataset.plateno;
            Dialog.alert({
                title: '退款说明',
                message: '已办理包月的用户如需退款，请联系停车场电话到线下现场办理，请记得随身携带预约车牌号对应的行驶证和车主身份证。'
            }).then((res) => {});
        },

        //取消预约弹窗
        handleCancel(e) {
            const carOrderLogId = e.currentTarget.dataset.id;
            const unionId = uni.getStorageSync('unionId');
            Dialog.confirm({
                title: '取消预约',
                message: '是否取消预约'
            }).then((res) => {
                util.request(api.cancelApply + `?carOrderLogId=${carOrderLogId}&userUnionId=${unionId}`, 'get').then((res) => {
                    if (res.code == 0) {
                        this.getmyCarOrderLog();
                        uni.showToast({
                            title: res.data,
                            icon: 'none'
                        });
                    } else {
                        uni.showToast({
                            title: res.msg,
                            icon: 'none'
                        });
                    }
                });
            });
        },

        //我的订单列表查询（车主|车位主）
        getmyCarOrderLog() {
            const unionId = uni.getStorageSync('unionId');
            const param = {
                userUnionId: unionId,
                personType: this.personType,
                orderType: this.active == 0 ? 2 : 1,
                //1临停  2包月
                pageNo: 1,
                pageSize: 100
            };
            util.request(api.myCarOrderLog, param, 'POST').then((res) => {
                if (res.code == 0) {
                    if (res.data && res.data.length > 0) {
                        res.data.forEach((e) => {
                            if (e.orderStatus == 1 || e.orderStatus == 2 || e.orderStatus == 7 || e.orderStatus == 105 || e.orderStatus == 106) {
                                e.typeStatus = '预约成功';
                            } else if (e.orderStatus == 3) {
                                e.typeStatus = '已取消';
                            } else if (e.orderStatus == 4 || e.orderStatus == 5 || e.orderStatus == 101 || e.orderStatus == 102) {
                                e.typeStatus = '待支付';
                            } else if (e.orderStatus == 8 || e.orderStatus == 107) {
                                e.typeStatus = '已完成';
                            } else if (e.orderStatus == 104 || e.orderStatus == 9) {
                                e.typeStatus = '订单关闭';
                            } // if (e.orderStatus == 1) {
                            //   e.typeStatus = "预约中";
                            // } else if (e.orderStatus == 2) {
                            //   e.typeStatus = "使用中";
                            // } else if (e.orderStatus == 3) {
                            //   e.typeStatus = "已取消";
                            // } else if (e.orderStatus == 4) {
                            //   e.typeStatus = "待支付";
                            // } else if (e.orderStatus == 5) {
                            //   e.typeStatus = "支付中";
                            // } else if (e.orderStatus == 6) {
                            //   e.typeStatus = "支付失败待重新支付";
                            // } else if (e.orderStatus == 7) {
                            //   e.typeStatus = "支付成功";
                            // } else if (e.orderStatus == 101) {
                            //   e.typeStatus = "待支付";
                            // } else if (e.orderStatus == 102) {
                            //   e.typeStatus = "支付中";
                            // } else if (e.orderStatus == 103) {
                            //   e.typeStatus = "支付失败待重新支付";
                            // } else if (e.orderStatus == 104) {
                            //   e.typeStatus = "订单关闭";
                            // } else if (e.orderStatus == 105) {
                            //   e.typeStatus = "支付成功";
                            // } else if (e.orderStatus == 106) {
                            //   e.typeStatus = "预约中";
                            // } else if (e.orderStatus == 107) {
                            //   e.typeStatus = "已完成";
                            // } else if (e.orderStatus == 108) {
                            //   e.typeStatus = "申请退租中";
                            // } else if (e.orderStatus == 109) {
                            //   e.typeStatus = "车位主申请退租中";
                            // } else if (e.orderStatus == 110) {
                            //   e.typeStatus = "已退租";
                            // }

                            if (e.durationUnit == 1) {
                                e.dw = '年';
                            } else if (e.durationUnit == 2) {
                                e.dw = '个月';
                            } else if (e.durationUnit == 3) {
                                e.dw = '日';
                            } else if (e.durationUnit == 4) {
                                e.dw = '小时';
                            } else if (e.durationUnit == 5) {
                                e.dw = '分钟';
                            }
                        });
                    }

                    this.setData({
                        list: res.data
                    });
                }
            });
        },

        //联系方式
        getcall() {
            const unionId = uni.getStorageSync('unionId');
            util.request(api.call + '?carOrderLogId=' + this.carOrderLogId + '&userUnionId=' + unionId + '&type=' + this.type, 'get').then((res) => {
                if (res.code == 0) {
					if(uni.getStorageSync('weixin') == 3 || uni.getStorageSync('weixin') == 4){
						ZWJSBridge.phoneCall({
						  "corpId": res.data
						}).then(res => {
						  console.log(res)
						}).catch(err => {
						  console.log(err) 
						})
					}else{
						uni.makePhoneCall({
							phoneNumber: res.data
						}).catch((e) => {
							console.log(e);
						});
					}
                } else {
                    uni.showToast({
                        title: res.msg,
                        icon: 'none'
                    });
                }
            });
        },

        //留言咨询
        gotoMessage(e) {
            console.log(e.currentTarget.dataset);
            let url = e.currentTarget.dataset.url;
            uni.navigateTo({
                url
            });
        },

        //修改车牌号
        setplateNoModify(data) {
            util.request(api.plateNoModify + '?carOrderLogId=' + this.carOrderLogId + '&plateNo=' + data, 'get').then((res) => {
                if (res.code == 0) {
                    this.getmyCarOrderLog();
                } else {
                    uni.showToast({
                        title: res.msg,
                        icon: 'none'
                    });
                }
            });
        },

        //续租
        gotoBuy(e) {
            let parkingCode = e.currentTarget.dataset.data.parkingCode;
            uni.navigateTo({
                url: '../newMonthpark/newMonthpark?param=' + parkingCode
            });
        },

        //点击详情显示计费
        showDetail(e) {
            // this.setData({})
            uni.showModal({
                showCancel: false,
                confirmText: '我知道了',
                // confirmColor:' #00BCAB',
                title: '计费时段',
                content: e.currentTarget.dataset.detail.tmpArriveTime + '~' + e.currentTarget.dataset.detail.tmpEndTime
            });
        },

        //到这去
        gotoNavigate(e) {
            this.setLog('GO_HERE');
            const data = e.currentTarget.dataset.data;
            let param = {
                latitude: Number(data.gmapy),
                longitude: Number(data.gmapx),
                address: data.parkingAddress
            };
            this.onRunApi(param);
        },

        /**调用导航 */

        /**需要引入util判断版本
     * @param {e} e 参数e是一个对象
     * address:目标地址，必填
     * latitude:目标地址纬度,必须是number类型
     * longitude：目标地址经度，必须是number类型
     * 必须在wxml页面创建一个地图，若是不展示地图则将地图设置hidden=true,可将下列代码直接复制
     * <view hidden="true">
      <map
          class="map"
          id="mymap"
      >
        </map>
      </view>
     */
        onRunApi(e) {
			console.log(e)
            const version = uni.getSystemInfoSync().SDKVersion;	
			if(uni.getStorageSync('weixin') == 2){
				jWeixin.miniProgram.navigateTo({
					url: "/pages/map/map?lat=" + e.latitude + '&long=' + e.longitude
				})
			}else{
				// window.location.href = 'http://api.map.baidu.com/marker?location=' + e.latitude + ',' + e.longitude +'&title='+ e.address +'&content=&output=html' //百度
				// window.location.href = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:' + e.latitude + ',' + e.longitude +';addr:'+ e.address   //腾讯导航
				window.location.href = 'http://uri.amap.com/marker?position=' + e.latitude + ',' + e.longitude +'&name='+ e.address +'&coordinate=gaode&callnative=1'  //高德
			}

            // if (util.compareVersion(version, '2.14.0') < 0) {
            //     uni.showToast({
            //         title: '当前微信版本过低，无法使用该功能，请升级到最新微信版本后重试。',
            //         icon: 'none'
            //     });
            //     return;
            // }
		
            // const mapCtx = uni.createMapContext('mymap');
			
            // mapCtx.openMapApp({
            //     latitude: e.latitude,
            //     longitude: e.longitude,
            //     destination: e.address,
            //     complete: (res) => {
            //         console.log(res);
            //     }
            // });
        },

        imageLoad: function () {
            var that = this;
            uni.getSystemInfo({
                success: function (res) {
                    //我们设计图片的尺寸是750*388
                    var width = res.windowWidth; //获取当前屏幕的宽度

                    var rao = 750 / width; //图片宽度／屏幕的宽度

                    var height = 288 / rao; //图片高度／比例

                    that.setData({
                        imgheights: height //设置等比缩放的宽度
                    });
                }
            });
        },

        openSetting() {
            uni.openSetting();
        },

        /**
         * 页面埋点
         */
        setLog(e) {
            let param = {
                operation: e
            };
            util.request(api.setLog, param, 'POST', 'application/x-www-form-urlencoded')
                .then((res) => {
                    if (res.success) {
                        console.log('log');
                    }
                })
                .catch((err) => {
                    console.log(err);
                });
        }
    }
};
</script>
<style>
@import './index.css';
</style>
